var UserID
//获取应用实例
var app = getApp()
Page({
  data: {
    // item1: '活动1',
    // item2: '活动2',
    // item3: '活动3',
    defaultSize: 'default',
    disabled: false,
    plain: false,
    loading: false,
    disabled: false
  },
  onLoad: function (options) {
    var that = this;
    UserID = app.globalData.UserID;
    console.log(UserID);
    wx.request({
      url: 'https://ke.slickghost.com/dk/chooseActivity.php',
      data:{
        UserID: UserID
      },
      headers: {
        'Content-Type': 'application/json'
      },
      success: function (res) {
        //将获取到的json数据，存在名字叫array的这个数组中
        that.setData({
          array: res.data

        })
      }
    })


  },
  //事件处理函数
  bindViewTap: function (e) {
    var id=e.target.id;
    // console.log(id);
    wx.navigateTo({
      url: '../details/details?ActID='+id
    })
  }

})
